@extends("admin.layout.main")

@section("css")
	<link rel="stylesheet" href="/adstatic/user/user.css" media="all" />
@endsection

@section("content")
	<blockquote class="layui-elem-quote news_search">
		<div class="layui-inline">
		    <div class="layui-input-inline">
		    	<input type="text" value="" placeholder="请输入关键字" class="layui-input search_input">
		    </div>
		    <a class="layui-btn search_btn">查询</a>
		</div>
		<div class="layui-inline">
			<a class="layui-btn layui-btn-normal usersAdd_btn">添加管理员</a>
		</div>
		<div class="layui-inline">
			<div class="layui-form-mid layui-word-aux"></div>
		</div>
	</blockquote>
	<div class="layui-form users_list">
	  	<table class="layui-table">
		    <colgroup>
				<col width="">
				<col>
				<col width="">
				<col >
				<col >
				<col width="">
				<col width="">
		    </colgroup>
		    <thead>
				<tr>
					{{--<th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose" id="allChoose"></th>--}}
					<th>用户名</th>
					<th>邮箱</th>
					<th>手机号</th>
					<th>是否启用</th>
					<th>操作</th>
				</tr> 
		    </thead>
		    <tbody class="users_content">
			@foreach ($admins as $admin)
				<tr>
				{{--<td data-id="{{ $admin->id }}"><input type="checkbox" name="checked" lay-skin="primary" lay-filter="choose"></td>--}}
				<td>{{ $admin->username }}</td>
				<td>{{ $admin->email }}</td>
				<td>{{ $admin->tel }}</td>
				<td>
					<input data-id="{{ $admin->id }}" type="checkbox" lay-skin="switch" lay-text="是|否" lay-filter="isOn"
					   @if ($admin->status == 1) checked @endif>
				</td>
				<td>
					<a data-id="{{ $admin->id }}" class="layui-btn layui-btn-normal layui-btn-mini edit_admin">
						<i class="layui-icon">&#xe642;</i>
						编辑
					</a>
				</td>
				</tr>
			@endforeach
			</tbody>
		</table>
	</div>
	<div style="text-align: right;">
	{{ $admins->links() }}
	</div>

@endsection

@section("js")
	<script type="text/javascript" src="/adstatic/user/admins.js"></script>
@endsection
